//
//  WBNetworkManager+Extension.swift
//  郑好微博
//
//  Created by WF on 2017/7/3.
//  Copyright © 2017年 WF. All rights reserved.
//

import Foundation

// MARK: - 封装新浪微博的网络请求方法
extension WBNetworkManager {
    
    /// 加载微博数据字典数组
    ///
    /// - Parameter completion: 完成回调[list: 微博字典数组/是否成功]
    func statusList(completion: @escaping (_ list: [[String: Any]]?, _ isSuccess: Bool)->()) {
        
        let urlString = "https://api.weibo.com/2/statuses/home_timeline.json"

        tokenRequest(URLString: urlString, parameters: nil){ (json, isSuccess) in
            
            let result = json?["statuses"] as? [[String: Any]]
        }
        
 
//            let result = json?["statuses"] //as? [String: Any]
            

//            let result = json["statuses"]
            
//            completion(result, isSuccess)
    }
}
